package com.ljm.sys.org.dto;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
    * 部门表
    * </p>
 *
 * @author ming
 * @since 2019-04-12
 */

@ApiModel(value="SysOrgDepartDto对象", description="部门表")

public class SysOrgDepartDto implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    private Long id;

    @ApiModelProperty(value = "版本号")
    private Long version;

    @ApiModelProperty(value = "创建人")
    private String creater;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "修改人")
    private String editor;

    @ApiModelProperty(value = "修改时间")
    private LocalDateTime editTime;

    @ApiModelProperty(value = "状态：-1注销、1正常、0冻结")
    private Integer status;

    @ApiModelProperty(value = "是否删除0否1是（用于逻辑删除）")
    private Integer isDelete;

    @ApiModelProperty(value = "部门名称")
    private String deptName;

    @ApiModelProperty(value = "类型（1行政）")
    private String type;

    @ApiModelProperty(value = "机构id")
    private String orgId;

    @ApiModelProperty(value = "父级id")
    private Long parentId;

    @ApiModelProperty(value = "层级全称")
    private String fullName;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "是否有下级")
    private boolean hasChildren;

    @ApiModelProperty(value = "是否叶子")
    private String isLeaf;

    @ApiModelProperty(value = "是否叶子")
    private boolean leaf;

    @ApiModelProperty(value = "排序")
    private Integer sort;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public Long getVersion() {
        return version;
    }

    public void setVersion(Long version) {
        this.version = version;
    }
    public String getCreater() {
        return creater;
    }

    public void setCreater(String creater) {
        this.creater = creater;
    }
    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }
    public String getEditor() {
        return editor;
    }

    public void setEditor(String editor) {
        this.editor = editor;
    }
    public LocalDateTime getEditTime() {
        return editTime;
    }

    public void setEditTime(LocalDateTime editTime) {
        this.editTime = editTime;
    }
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
    public Integer getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }
    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getOrgId() {
        return orgId;
    }

    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getFullName() {
        return fullName;
    }

    public void setFullName(String fullName) {
        this.fullName = fullName;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public boolean isHasChildren() {
        return hasChildren;
    }

    public void setHasChildren(boolean hasChildren) {
        this.hasChildren = hasChildren;
    }

    public String getIsLeaf() {
        return isLeaf;
    }

    public void setIsLeaf(String isLeaf) {
        this.isLeaf = isLeaf;
        this.setHasChildren("0".equals(isLeaf));
        this.setLeaf("1".equals(isLeaf));
    }

    public boolean isLeaf() {
        return leaf;
    }

    public void setLeaf(boolean leaf) {
        this.leaf = leaf;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    @Override
    public String toString() {
        return "SysOrgDepartDto{" +
        "id=" + id +
        ", version=" + version +
        ", creater=" + creater +
        ", createTime=" + createTime +
        ", editor=" + editor +
        ", editTime=" + editTime +
        ", status=" + status +
        ", isDelete=" + isDelete +
        ", deptName=" + deptName +
        ", type=" + type +
        ", orgId=" + orgId +
        ", parentId=" + parentId +
        ", fullName=" + fullName +
        ", remark=" + remark +
        "}";
    }
}
